package com.bugpool.leilema.freamwork.datascope.impl;

import com.bugpool.leilema.tc.bean.dto.DataScopeDTO;

/**
 * @Author wh
 * @Description 用户数据权限
 * @Date 2023/6/13 17:36
 * @Version 1.0
 **/
public class UserDataScope extends AbstractDataScope  {
    @Override
    public StringBuilder sqlEnhance(DataScopeDTO dataScopeDTO) {
        StringBuilder sqlStringBuilder = dataScopeDTO.getSqlStringBuilder();
        sqlStringBuilder
                .append(" OR ")
                .append(dataScopeDTO.getTbAlias()+SUFFIX)
                .append("create_user = ")
                .append(dataScopeDTO.getUserId())
                .append(" ");
        return sqlStringBuilder;
    }


}
